﻿-- Page de synchro
delete from medianamik_Node where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C'
IF NOT EXISTS( SELECT NULL  FROM medianamik_Node where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C')  BEGIN  INSERT INTO [dbo].[medianamik_Node]             ([NodeId]             ,[ParentNodeId]             ,[ContentNodeId]             ,[TypeId]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[Flags]             ,[IsDeleted]             ,[Path]             ,[Depth]             ,[Position]             ,[Roles])       VALUES             ('96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'7A6A4803-1D66-40F5-8DAB-76AFDAE93CF0'             ,NULL             ,'3DAD4D08-B9BC-4603-A8DE-42A88A354B5B'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,         0             ,         0             ,'.7A6A4803-1D66-40F5-8DAB-76AFDAE93CF0.96DD8DA9-550E-459E-AF4F-F008A38EDD4C.'             ,         1             ,         0             ,'')  END
IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND CultureNAme = 'en-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('4F9141A3-DA92-4A8E-AC14-0A15B65DF25B'             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,         1             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'en-CA')  END
IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND CultureNAme = 'fr-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('15AAC6FB-164B-4667-9776-D5D2D4CC499B'             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,         1             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'fr-CA')  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '7213C44C-BBC7-4095-AE52-0DE37E7276C7' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'7213C44C-BBC7-4095-AE52-0DE37E7276C7'             ,'False'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '47096ACE-4C51-4C8F-BAE2-15A6FD90F6E9' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'47096ACE-4C51-4C8F-BAE2-15A6FD90F6E9'             ,'default.aspx'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '18232ABC-5DD8-4AE5-947A-16F3AF3A8715' AND CultureName = 'en-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'18232ABC-5DD8-4AE5-947A-16F3AF3A8715'             ,'Synchronization'             ,         0             ,         0             ,null             ,'en-CA'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '18232ABC-5DD8-4AE5-947A-16F3AF3A8715' AND CultureName = 'fr-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'18232ABC-5DD8-4AE5-947A-16F3AF3A8715'             ,'Synchronisation'             ,         0             ,         0             ,null             ,'fr-CA'             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '60C0AA24-C355-4722-ACAA-21D363351479' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'60C0AA24-C355-4722-ACAA-21D363351479'             ,'eede521a-746e-4943-843e-80f54d884824'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = 'A5F1D87F-3086-4CEA-A983-A09D4FE9FC4C' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'A5F1D87F-3086-4CEA-A983-A09D4FE9FC4C'             ,'46c11abf-a1e3-4d61-a46d-660a677ae5dc'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = 'A9D96D60-4E0D-4EF6-831C-AAD02A1D2BCF' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'A9D96D60-4E0D-4EF6-831C-AAD02A1D2BCF'             ,'True'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '96DD8DA9-550E-459E-AF4F-F008A38EDD4C' AND PropertyId = '29571C7C-3B7A-4576-8BB0-F2EAF8413D20' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'96DD8DA9-550E-459E-AF4F-F008A38EDD4C'             ,'29571C7C-3B7A-4576-8BB0-F2EAF8413D20'             ,'True'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:02:12.770'             ,'sa'             ,'2009-04-20 15:42:56.847'             ,'sa'             )  END

-- Module de syncho
delete from medianamik_Node where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC'
IF NOT EXISTS( SELECT NULL  FROM medianamik_Node where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC')  BEGIN  INSERT INTO [dbo].[medianamik_Node]             ([NodeId]             ,[ParentNodeId]             ,[ContentNodeId]             ,[TypeId]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[Flags]             ,[IsDeleted]             ,[Path]             ,[Depth]             ,[Position]             ,[Roles])       VALUES             ('46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,NULL             ,NULL             ,'627E47FC-6C91-444F-B3A6-79B1F687EF9A'             ,'2008-12-15 09:00:43.683'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             ,         0             ,         0             ,'.46C11ABF-A1E3-4D61-A46D-660A677AE5DC.'             ,         0             ,         0             ,'')  END
IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND CultureNAme = 'fr-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('652FD443-3052-452C-BB29-55C61B262335'             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,         1             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'fr-CA')  END
IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND CultureNAme = 'en-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('AA31300D-E9D0-429B-8F2B-9AB04A412ECD'             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,         1             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'en-CA')  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND PropertyId = '5DEC52FD-25C3-4AB3-AFC7-6E1E38437FF1' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,'5DEC52FD-25C3-4AB3-AFC7-6E1E38437FF1'             ,'3b1989e7-3f49-4a77-9b4d-39526d8213b6'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND PropertyId = '277B7D42-8EC5-400F-8FF6-6E832A36F18C' AND CultureName = 'en-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,'277B7D42-8EC5-400F-8FF6-6E832A36F18C'             ,'Synchronization'             ,         0             ,         0             ,null             ,'en-CA'             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND PropertyId = '277B7D42-8EC5-400F-8FF6-6E832A36F18C' AND CultureName = 'fr-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,'277B7D42-8EC5-400F-8FF6-6E832A36F18C'             ,'Synchronisation'             ,         0             ,         0             ,null             ,'fr-CA'             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND PropertyId = '12179708-3E1B-4E30-A654-B762E9E3159C' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,'12179708-3E1B-4E30-A654-B762E9E3159C'             ,'synchronizationmanagement'             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '46C11ABF-A1E3-4D61-A46D-660A677AE5DC' AND PropertyId = 'B13C9212-65B3-491B-8DC7-C2E775A6D669' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'46C11ABF-A1E3-4D61-A46D-660A677AE5DC'             ,'B13C9212-65B3-491B-8DC7-C2E775A6D669'             ,''             ,         0             ,         0             ,null             ,''             ,'2008-12-15 09:00:43.687'             ,'sa'             ,'2009-04-20 15:42:23.367'             ,'sa'             )  END

-- Effacement du MedianamikLock (n'est plus utilisé)
delete from medianamik_Node where TypeId = 'CF2886B9-FF1C-4A34-A96F-E21FDEDDFDB9'
delete from medianamik_Type where typeid = 'CF2886B9-FF1C-4A34-A96F-E21FDEDDFDB9'
update medianamik_Property set datatypeid='0d5b7a19-a12a-46b5-9a2c-8d15093f5666' where propertyid = '60c0aa24-c355-4722-acaa-21d363351479'

-- Module de log
IF NOT EXISTS(SELECT NULL FROM Medianamik_Role WHERE RoleId = '7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f')  BEGIN INSERT INTO medianamik_Role (RoleId, Name) VALUES('7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f', 'ViewLogs') END
IF NOT EXISTS(SELECT NULL FROM Medianamik_RoleInGroup WHERE RoleId = '7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f' AND GroupId = '4f1298a0-61d4-4b72-badc-28094965b3d5')  BEGIN INSERT INTO medianamik_RoleInGroup (RoleInGroupId,RoleId, GroupId) VALUES(NEWID(), '7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f', '4f1298a0-61d4-4b72-badc-28094965b3d5') END

IF EXISTS(SELECT NULL FROM Medianamik_PageInRole WHERE RoleId = '510d8709-41dd-423f-a576-17c4869a70b6' AND PageId = '3dcc07a0-83fc-4afc-86cb-32db6c3035b3') BEGIN DELETE FROM Medianamik_PageInRole WHERE RoleId = '510d8709-41dd-423f-a576-17c4869a70b6' AND PageId = '3dcc07a0-83fc-4afc-86cb-32db6c3035b3' END
IF NOT EXISTS(SELECT NULL FROM Medianamik_PageInRole WHERE RoleId = '7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f' AND PageId = '3dcc07a0-83fc-4afc-86cb-32db6c3035b3') BEGIN INSERT INTO Medianamik_PageInRole(PageInRoleId, RoleId, PageId) VALUES(NEWID(), '7eff5d90-38b2-4b8d-ae6f-b41aefd34e5f', '3dcc07a0-83fc-4afc-86cb-32db6c3035b3') END

-- ==== Ajout de la page MaintenanceTools ====--
IF NOT EXISTS( SELECT NULL  FROM medianamik_Node where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1')  BEGIN  INSERT INTO [dbo].[medianamik_Node]             ([NodeId]             ,[ParentNodeId]             ,[ContentNodeId]             ,[TypeId]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[Flags]             ,[IsDeleted]             ,[Path]             ,[Depth]             ,[Position]             ,[Roles])       VALUES             ('99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'7A6A4803-1D66-40F5-8DAB-76AFDAE93CF0'             ,NULL             ,'3DAD4D08-B9BC-4603-A8DE-42A88A354B5B'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,         0             ,         0             ,'.7A6A4803-1D66-40F5-8DAB-76AFDAE93CF0.99C1370F-342C-4A75-88AC-DE796E4CDCF1.'             ,         1             ,         0             ,'')  END

IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND CultureNAme = 'fr-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('D4DC7919-2F9D-4A83-B589-5B0B49835A6D'             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,         1             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'fr-CA')  END
IF NOT EXISTS(SELECT NULL FROM Medianamik_NodeInstance WHERE NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND CultureNAme = 'en-CA')  BEGIN  INSERT INTO [dbo].[medianamik_NodeInstance]             ([NodeInstanceId]             ,[NodeId]             ,[IsActive]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             ,[CultureName])       VALUES             ('F0890209-9588-4C6E-8F98-F65488FCF9C9'             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,         1             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'en-CA')  END

IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = 'A5F1D87F-3086-4CEA-A983-A09D4FE9FC4C' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'A5F1D87F-3086-4CEA-A983-A09D4FE9FC4C'             ,'7a6a4803-1d66-40f5-8dab-76afdae93cf0'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.283'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = 'A9D96D60-4E0D-4EF6-831C-AAD02A1D2BCF' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'A9D96D60-4E0D-4EF6-831C-AAD02A1D2BCF'             ,'True'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.313'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '7213C44C-BBC7-4095-AE52-0DE37E7276C7' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'7213C44C-BBC7-4095-AE52-0DE37E7276C7'             ,'False'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.283'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '29571C7C-3B7A-4576-8BB0-F2EAF8413D20' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'29571C7C-3B7A-4576-8BB0-F2EAF8413D20'             ,'True'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.313'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '60C0AA24-C355-4722-ACAA-21D363351479' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'60C0AA24-C355-4722-ACAA-21D363351479'             ,'eede521a-746e-4943-843e-80f54d884824'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.283'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '47096ACE-4C51-4C8F-BAE2-15A6FD90F6E9' AND CultureName = '' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'47096ACE-4C51-4C8F-BAE2-15A6FD90F6E9'             ,'MaintenanceTools.aspx'             ,         0             ,         0             ,null             ,''             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.300'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '18232ABC-5DD8-4AE5-947A-16F3AF3A8715' AND CultureName = 'en-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'18232ABC-5DD8-4AE5-947A-16F3AF3A8715'             ,'Maintenance tools'             ,         0             ,         0             ,null             ,'en-CA'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.330'             ,'sa'             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_NodePropertyValue where NodeId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND PropertyId = '18232ABC-5DD8-4AE5-947A-16F3AF3A8715' AND CultureName = 'fr-CA' AND Revision IS NULL)  BEGIN  INSERT INTO [dbo].[medianamik_NodePropertyValue]             ([NodePropertyValueId]             ,[NodeId]             ,[PropertyId]             ,[Value]             ,[IsApproved]             ,[IsDeleted]             ,[Revision]             ,[CultureName]             ,[CreatedOn]             ,[CreatedBy]             ,[ModifiedOn]             ,[ModifiedBy]             )       VALUES             (NEWID()             ,'99C1370F-342C-4A75-88AC-DE796E4CDCF1'             ,'18232ABC-5DD8-4AE5-947A-16F3AF3A8715'             ,'Outils de maintenance'             ,         0             ,         0             ,null             ,'fr-CA'             ,'2009-04-09 14:16:59.747'             ,'sa'             ,'2009-04-09 16:30:25.283'             ,'sa'             )  END

-- Ajout du role ManageMedianamik pour la page
IF NOT EXISTS(SELECT NULL FROM Medianamik_PageInRole where PageId = '99C1370F-342C-4A75-88AC-DE796E4CDCF1' AND RoleId = '510D8709-41DD-423F-A576-17C4869A70B6' )
BEGIN
	INSERT INTO Medianamik_PageInRole(PageInRoleId, PageId, RoleId) VALUES(NEWID(),'99C1370F-342C-4A75-88AC-DE796E4CDCF1', '510D8709-41DD-423F-A576-17C4869A70B6')
END

--Suppression de la page SearchTools.aspx
DELETE FROM medianamik_PageInRole where PageId = 'a1655917-f7fb-47f7-82b8-595287fa6911'
DELETE FROM medianamik_Node where NodeId = 'a1655917-f7fb-47f7-82b8-595287fa6911'

--Suppression du Trigger [trg_medianamik_MoveDeletedValues]
IF  EXISTS (SELECT * FROM sys.triggers WHERE object_id = OBJECT_ID(N'[dbo].[trg_medianamik_MoveDeletedValues]'))
DROP TRIGGER [dbo].[trg_medianamik_MoveDeletedValues]

-- Suppression de la table medianamik_NodePropertyValue_deleted
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[medianamik_NodePropertyValue_Deleted]') AND type in (N'U'))
DROP TABLE [dbo].[medianamik_NodePropertyValue_Deleted]

-- Conversion des colonnes MedianamikControlWidth et PrimaryMedianamikControlWidth en varchar
ALTER TABLE medianamik_Property ALTER COLUMN MedianamikControlWidth VARCHAR(10) NULL
ALTER TABLE medianamik_Property ALTER COLUMN PrimaryMedianamikControlWidth VARCHAR(10) NULL

-- Ajout du parametre maxRevisions a CleanUpOldRevisions
IF  EXISTS (SELECT NULL FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[medianamik_CleanUpNodePropertyValues]') AND type in (N'P', N'PC'))
BEGIN
	DECLARE @alterProc NVARCHAR(MAX)
	SELECT @alterProc = '
	ALTER PROCEDURE [dbo].[medianamik_CleanUpNodePropertyValues] 
	-- Add the parameters for the stored procedure here
	@NodeId UNIQUEIDENTIFIER, 
	@CultureName NVARCHAR(10),
	@MaxRevisions INT = 3
AS
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;

    -- Insert statements for procedure here
;With OldValues as(	SELECT NodePropertyValueId
  FROM [dbo].[vw_medianamik_NodePropertyValueGeneration] v
	LEFT OUTER JOIN [dbo].[vw_medianamik_DuplicateProperty] d 
		on v.NodeId = d.NodeId
		AND v.PropertyId = d.PropertyId
		AND v.CultureName = d.CultureName
	where v.Generation >= @MaxRevisions
		AND d.NodeId IS NULL /* On exclu les valeurs qui ont des doublons pour une revision
								Il s''agit d''une anomalie qui peut causer l''effacement non désiré de certaines valeurs*/
		AND v.NodeId = @NodeId
		AND v.CultureName IN(@CultureName, '''')
)
DELETE FROM medianamik_NodePropertyvalue 
WHERE NodePropertyValueId IN(select ov.NodePropertyValueId FROM oldValues ov)

END
'

	EXEC sp_executesql @alterProc 
END

-- Procédures stockées pour les clés non traduites
IF NOT EXISTS (SELECT NULL FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[medianamik_GetNonTranslatedResourceSets]') AND type in (N'P', N'PC'))
BEGIN
EXEC('CREATE PROCEDURE [dbo].[medianamik_GetNonTranslatedResourceSets]
AS
BEGIN
	-- NOTE: Si vous modifiez cette prodédure, pensez à modifier medianamik_GetNonTranslatedResources aussi
	SET NOCOUNT ON;

    DECLARE @NbLanguages INT

	SET @NbLanguages = (SELECT COUNT(*) FROM medianamik_Culture WHERE ContentManagementActive = 1)	

	SELECT ResourceSet FROM
	(SELECT ResourceId, ResourceSet FROM Localizations
	WHERE LocaleId <> ''''
	GROUP BY ResourceId, ResourceSet HAVING COUNT(ResourceId) < @NbLanguages
	UNION
	SELECT ResourceId, ResourceSet FROM Localizations
	GROUP BY ResourceId, ResourceSet HAVING COUNT(ResourceId) = 1) as ids
	GROUP BY ResourceSet
	ORDER BY ResourceSet
END')
GRANT EXECUTE ON [dbo].[medianamik_GetNonTranslatedResourceSets] TO [Medianamik_DataAccess]
END

IF NOT EXISTS (SELECT NULL FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[medianamik_GetNonTranslatedResources]') AND type in (N'P', N'PC'))
BEGIN
EXEC('CREATE PROCEDURE [dbo].[medianamik_GetNonTranslatedResources]
	@set AS VARCHAR(255)
AS
BEGIN
	-- NOTE: Si vous modifiez cette prodédure, pensez à modifier medianamik_GetNonTranslatedResources aussi
	SET NOCOUNT ON;

	DECLARE @NbLanguages INT

	SET @NbLanguages = (SELECT COUNT(*) FROM medianamik_Culture WHERE ContentManagementActive = 1)	

	SELECT ResourceId, ResourceSet FROM Localizations
	WHERE LocaleId <> ''''
	GROUP BY ResourceId, ResourceSet HAVING COUNT(ResourceId) < @NbLanguages AND ResourceSet = @set
	UNION
	SELECT ResourceId, ResourceSet FROM Localizations
	GROUP BY ResourceId, ResourceSet HAVING ResourceSet = @set AND COUNT(ResourceId) = 1
	ORDER BY ResourceId
END')
GRANT EXECUTE ON [dbo].[medianamik_GetNonTranslatedResources] TO [Medianamik_DataAccess]
END

-- Ajout d'un MultiLine TextBox pour le type nvarchar(max)
IF NOT EXISTS(SELECT NULL FROM dbo.Medianamik_MedianamikControl WHERE [MedianamikControlID] =   '3B55A6D8-2733-428C-9994-05D9BBAB3D1E')  INSERT INTO [dbo].[medianamik_MedianamikControl]             ([MedianamikControlID]             ,[Name]             ,[MaySpecifyWidth]             ,[DefaultWidth]             ,[MaySpecifyHeight]             ,[DefaultHeight]             ,[MaySpecifyLength]             ,[DefaultLength]             ,[CreatedOn]             ,[Type]             ,[FullName]             ,[MaySpecifyValidationExpression]             ,[MayBeRequired]             ,[MayBeUnique]             ,[DataTypeID])       VALUES             ('3B55A6D8-2733-428C-9994-05D9BBAB3D1E'             ,'MultiLine TextBox'             ,         1             ,       300              ,         1             ,       100                ,         1               ,        50                ,'2008-06-09 13:50:49.000'                ,         0             ,'Medianamik.UI.Controls.MultiLineTextBox, Medianamik.UI'              ,         0              ,         1              ,         1              ,'D45C7AF5-3C9F-40CD-82FE-D09C03FAF7FE'              )

-- **** Blogues ****

-- Compléter le profil avec les propriétés : Nickname, WebSiteURL, SubscriptionDate, Avatar, Active
IF NOT EXISTS( SELECT NULL FROM medianamik_Property where PropertyId = '78662302-CD0D-4025-88D3-0B8E8B524B6D' )  BEGIN  INSERT INTO [dbo].[medianamik_Property]             ([PropertyId]             ,[TypeId]             ,[Name]             ,[HaveTooltip]             ,[IsLanguageNeutral]             ,[IsRequired]             ,[IsUnique]             ,[ValidationRegex]             ,[GroupName]             ,[Flags]             ,[MedianamikControlId]             ,[MedianamikControlWidth]             ,[MedianamikControlHeight]             ,[Position]             ,[PrimaryPropertyId]             ,[PrimaryTypeId]             ,[PrimaryMedianamikControlId]             ,[PrimaryMedianamikControlWidth]             ,[PrimaryMedianamikControlHeight]             ,[Roles]             ,[MaxLength]             ,[MinLength]             ,[DataTypeId]             ,[PrimaryDataTypeId]             ,[Description]             ,[TreeRootNodeId]             , [PrimaryTreeRootNodeId])       VALUES             ('78662302-CD0D-4025-88D3-0B8E8B524B6D'             ,'45C90CDA-E48D-4F9E-A5A4-1C398B9DD5F5'     , 'Nickname'     ,         0     ,         1     ,         0     ,         0     ,NULL     ,''     ,         1     ,'7E4BA709-965E-42DD-92B8-028DDCED0D7C'     ,'300px'     ,null     ,         0     ,NULL     ,NULL     ,NULL     ,null     ,null      ,''     ,        50     ,NULL     ,'195F6F67-F42D-428B-BE3E-AD8762CDE76F'     ,'0D5B7A19-A12A-46B5-9A2C-8D15093F5666'     ,'Surnom'     ,NULL              ,NULL             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_Property where PropertyId = 'A3F707B3-C5C3-407F-ABD4-238F13CF5224' )  BEGIN  INSERT INTO [dbo].[medianamik_Property]             ([PropertyId]             ,[TypeId]             ,[Name]             ,[HaveTooltip]             ,[IsLanguageNeutral]             ,[IsRequired]             ,[IsUnique]             ,[ValidationRegex]             ,[GroupName]             ,[Flags]             ,[MedianamikControlId]             ,[MedianamikControlWidth]             ,[MedianamikControlHeight]             ,[Position]             ,[PrimaryPropertyId]             ,[PrimaryTypeId]             ,[PrimaryMedianamikControlId]             ,[PrimaryMedianamikControlWidth]             ,[PrimaryMedianamikControlHeight]             ,[Roles]             ,[MaxLength]             ,[MinLength]             ,[DataTypeId]             ,[PrimaryDataTypeId]             ,[Description]             ,[TreeRootNodeId]             , [PrimaryTreeRootNodeId])       VALUES             ('A3F707B3-C5C3-407F-ABD4-238F13CF5224'             ,'45C90CDA-E48D-4F9E-A5A4-1C398B9DD5F5'     , 'WebSiteURL'     ,         0     ,         1     ,         0     ,         0     ,NULL     ,''     ,         1     ,'7E4BA709-965E-42DD-92B8-028DDCED0D7C'     ,'300px'     ,null     ,         0     ,NULL     ,NULL     ,NULL     ,null     ,null      ,''     ,       500     ,NULL     ,'195F6F67-F42D-428B-BE3E-AD8762CDE76F'     ,'0D5B7A19-A12A-46B5-9A2C-8D15093F5666'     ,'Adresse du site web'     ,NULL              ,NULL             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_Property where PropertyId = 'EF607D70-8909-4D45-B242-786C7989F90E' )  BEGIN  INSERT INTO [dbo].[medianamik_Property]             ([PropertyId]             ,[TypeId]             ,[Name]             ,[HaveTooltip]             ,[IsLanguageNeutral]             ,[IsRequired]             ,[IsUnique]             ,[ValidationRegex]             ,[GroupName]             ,[Flags]             ,[MedianamikControlId]             ,[MedianamikControlWidth]             ,[MedianamikControlHeight]             ,[Position]             ,[PrimaryPropertyId]             ,[PrimaryTypeId]             ,[PrimaryMedianamikControlId]             ,[PrimaryMedianamikControlWidth]             ,[PrimaryMedianamikControlHeight]             ,[Roles]             ,[MaxLength]             ,[MinLength]             ,[DataTypeId]             ,[PrimaryDataTypeId]             ,[Description]             ,[TreeRootNodeId]             , [PrimaryTreeRootNodeId])       VALUES             ('EF607D70-8909-4D45-B242-786C7989F90E'             ,'45C90CDA-E48D-4F9E-A5A4-1C398B9DD5F5'     , 'SubscriptionDate'     ,         0     ,         1     ,         0     ,         0     ,NULL     ,''     ,         0     ,'A375D198-37E5-4033-9FFA-F430C7063DE8'     ,'200px'     ,null     ,         0     ,NULL     ,NULL     ,NULL     ,null     ,null      ,''     ,NULL     ,NULL     ,'87CF5A6E-DEE6-49CE-A22B-9E69B11E351F'     ,'0D5B7A19-A12A-46B5-9A2C-8D15093F5666'     ,'Date d''inscription'     ,NULL              ,NULL             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_Property where PropertyId = 'A83D8AD5-06E9-4899-982C-A466C330B29E' )  BEGIN  INSERT INTO [dbo].[medianamik_Property]             ([PropertyId]             ,[TypeId]             ,[Name]             ,[HaveTooltip]             ,[IsLanguageNeutral]             ,[IsRequired]             ,[IsUnique]             ,[ValidationRegex]             ,[GroupName]             ,[Flags]             ,[MedianamikControlId]             ,[MedianamikControlWidth]             ,[MedianamikControlHeight]             ,[Position]             ,[PrimaryPropertyId]             ,[PrimaryTypeId]             ,[PrimaryMedianamikControlId]             ,[PrimaryMedianamikControlWidth]             ,[PrimaryMedianamikControlHeight]             ,[Roles]             ,[MaxLength]             ,[MinLength]             ,[DataTypeId]             ,[PrimaryDataTypeId]             ,[Description]             ,[TreeRootNodeId]             , [PrimaryTreeRootNodeId])       VALUES             ('A83D8AD5-06E9-4899-982C-A466C330B29E'             ,'45C90CDA-E48D-4F9E-A5A4-1C398B9DD5F5'     , 'Avatar'     ,         0     ,         1     ,         0     ,         0     ,NULL     ,''     ,         1     ,'4ABB2122-FE61-48F4-A95E-F3F5AADF4D31'     ,'50px'     ,50     ,         0     ,NULL     ,NULL     ,NULL     ,null     ,null      ,''     ,NULL     ,NULL     ,'195F6F67-F42D-428B-BE3E-AD8762CDE76F'     ,'0D5B7A19-A12A-46B5-9A2C-8D15093F5666'     ,'Avatar'     ,NULL              ,NULL             )  END
IF NOT EXISTS( SELECT NULL FROM medianamik_Property where PropertyId = 'BDE79741-F723-4A9C-9118-F7B4809DC269' )  BEGIN  INSERT INTO [dbo].[medianamik_Property]             ([PropertyId]             ,[TypeId]             ,[Name]             ,[HaveTooltip]             ,[IsLanguageNeutral]             ,[IsRequired]             ,[IsUnique]             ,[ValidationRegex]             ,[GroupName]             ,[Flags]             ,[MedianamikControlId]             ,[MedianamikControlWidth]             ,[MedianamikControlHeight]             ,[Position]             ,[PrimaryPropertyId]             ,[PrimaryTypeId]             ,[PrimaryMedianamikControlId]             ,[PrimaryMedianamikControlWidth]             ,[PrimaryMedianamikControlHeight]             ,[Roles]             ,[MaxLength]             ,[MinLength]             ,[DataTypeId]             ,[PrimaryDataTypeId]             ,[Description]             ,[TreeRootNodeId]             , [PrimaryTreeRootNodeId])       VALUES             ('BDE79741-F723-4A9C-9118-F7B4809DC269'             ,'45C90CDA-E48D-4F9E-A5A4-1C398B9DD5F5'     , 'Active'     ,         0     ,         1     ,         0     ,         0     ,NULL     ,''     ,         0     ,'09BBED40-5BEB-434F-ABB2-4F46FB29B86E'     ,null     ,null     ,         0     ,NULL     ,NULL     ,NULL     ,null     ,null      ,''     ,NULL     ,NULL     ,'E7293D5E-0B55-4FF1-A24A-B4969B187A19'     ,'0D5B7A19-A12A-46B5-9A2C-8D15093F5666'     ,'Actif'     ,NULL              ,NULL             )  END
